From f5e64936da893ac74882b8f221ff54fd2967c91c Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 9 May 2014 17:13:53 -0400 Subject: [PATCH] GtkWindow: small cleanup The window type is a construct-only property, so we should pass it to g_object_new, not set it after the fact in the constructor. --- gtk/gtkwindow.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index 72c1d35e5f..e61d4e127f 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -1854,15 +1854,11 @@ gtk_window_buildable_custom_finished (GtkBuildable *buildable, GtkWidget* gtk_window_new (GtkWindowType type) { - GtkWindowPrivate *priv; GtkWindow *window; g_return_val_if_fail (type >= GTK_WINDOW_TOPLEVEL && type <= GTK_WINDOW_POPUP, NULL); - window = g_object_new (GTK_TYPE_WINDOW, NULL); - priv = window->priv; - - priv->type = type; + window = g_object_new (GTK_TYPE_WINDOW, "type", type, NULL); return GTK_WIDGET (window); } -- 2.30.2